<template>
	<view>
		<u-popup :mask-close-able="false" v-model="show" mode="bottom" closeable @close="close">
			<view class="box padding margin-bottom-xl">
				<view class="text-center text-lg">请选择支付方式</view>
				<view class="margin-top text-center pay-price">
					<text class="text-red">¥</text>
					<text class="text-red padding-left-money">{{ orderData.pay_amount }}</text>
				</view>
				<view class="cu-list menu margin-top">
<!--					<view class="cu-item solid-bottom">-->
<!--						<view class="content padding-tb-sm">-->
<!--							<view class="pay-icon">-->
<!--								<image src="@/static/image/order/balance.png" mode=""></image>-->
<!--								<text class="padding-left-xs">余额支付</text>-->
<!--								<text class="text-gray">（余额：¥0.00）</text>-->
<!--							</view>-->
<!--						</view>-->
<!--						<view class="action">-->
<!--							<u-radio-group v-model="selectedOption">-->
<!--							  <u-radio :name="1" activeColor="var(&#45;&#45;theme-color)"></u-radio>-->
<!--							</u-radio-group>-->
<!--						</view>-->
<!--					</view>-->
					<view class="cu-item">
						<view class="content padding-tb-sm">
							<view class="pay-icon">
								<image src="@/static/image/order/wepay.png" mode=""></image>
								<text class="padding-left-xs">微信支付</text>
							</view>
						</view>
						<view class="action">
							<u-radio-group v-model="selectedOption">
							  <u-radio :name="1" activeColor="var(--theme-color)"></u-radio>
							</u-radio-group>
						</view>
					</view>
				</view>
				<view class="submit">
					<view class="flex flex-direction">
						<button class="cu-btn china-btn-bg lg round"  @click="submit()">确认支付</button>
					</view>
					<!-- <u-button type="success" size="normal" @click="submit()">确认支付</u-button> -->
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		props: {
			cost: {
				type: [String, Number],
				default: '',
			},
			source: {
				type: String,
				default: '',
			},
			referParams:{
				type: Object,
				default: () => {},
			},
      orderData:{
        type: Object,
        default: () => {},
      }
		},
		data() {
			return {
				selectedOption: 1,
				userWallet:[],
        show: false
			};
		},
		created() {
		},
		methods:{
      open() {
        this.show = true
      },
      closed() {
        this.show = false
      },
			submit(){
        this.$emit('payCallBack', this.selectedOption )
			},
			close(e){
        this.closed()
        this.$emit('close');
			},
			//延长服务
			sendTable(){
				let self = this;
				let params = self.referParams;
				params.payType = self.selectedOption;
				uni.navigateTo({
					url:'/pages/table/payment/result?source=addOrder&orderId='+res.data.order.order_id
				})
			},

			// 预约阿姨
			sendPartner(){
				let self = this;
				let params = self.referParams;
				params.pay_type = self.selectedOption;
				uni.redirectTo({
					url:'/pages/order/payment/payment?source=partner&orderId=1'
				})
			}
		}
	}
</script>

<style lang="less">
.box{
	height: 32vh;
	.pay-price{
		font-size: 49upx;
	}
	.pay-icon{
		image{
			width: 60upx;
			height: 60upx;
		}
	}
	.submit{
		width: 90%;
		margin:30upx auto;
	}
}
.padding-left-money{
	padding-left: 4upx;
}
.u-popup {
  position: absolute !important;
}
</style>
